import request from '@/utils/request'

export function login(data) {
  return request({
    // url: '/vue-element-admin/user/login',
    url: '/user/login',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function getInfo(data) {
  return request({
    // url: '/vue-element-admin/user/info',
    url: '/user/info',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    headers: { 'content-type': 'application/json' },
    method: 'post'
  })
}

export function userCreate(data) {
  return request({
    url: '/user/create',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function userUpdateStatus(data) {
  return request({
    url: '/user/update_stauts',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function userModify(data) {
  return request({
    url: '/user/modify',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function userList(data) {
  return request({
    url: '/user/list',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}
